<?php
    
    class task_controller extends Controller
    {
        public function __construct(){
            parent::__construct();
        }
       
        public function index(){
			$this->load->controller('_header')->display(array('external_js' => 'action.js'));
			$this->load->controller('_sidebar')->display(array('selection' => 1));
            $this->load->view(transLang('task/index'))->display();
			$this->load->controller('_footer')->display();
        }
        
        public function ajax(){
        	if (empty($_POST['ele'])){
				$_POST['ele'] = 0;
			}
			else{
				$_POST['ele'] = intval($_POST['ele']);
			}
			
			print $this->load->model('task')->generateChild($_POST['ele']);
        }
    }